import request from '@/utils/request'
// scholarship
// 获取年份
export function getYearStrList(params) {
  return request({
    url: '/finances/nationalScholarshipController/getYearStrList',
    method: 'get',
    params
  })
}
// 获取补助计划
export function scholarshipPlanList(query) {
    return request({
      url: '/finances/nationalScholarshipController/list',
      method: 'get',
      params: query
    })
  }
export function addScholarshipPlan(data) {
  return request({
    url: '/finances/nationalScholarshipController',
    method: 'post',
    data: data
  })
}
export function editScholarshipPlan(data) {
  return request({
    url: '/finances/nationalScholarshipController',
    method: 'put',
    data: data
  })
}
export function removeScholarshipPlan(id) {
  return request({
    url: '/finances/nationalScholarshipController/'+ id,
    method: 'delete'
  })
}



// poorStudent
// 获取年份
export function getPoorStudentYearStrList(query) {
  return request({
    url: '/finances/difficultyTypeController/getDiffTypeYearList',
    method: 'get'
  })
}
// 查询困难类型管理列表
export function queryPoorStudentType(query) {
  return request({
    url: '/finances/difficultyTypeController/list',
    method: 'get',
    params: query
  })
}
// 添加困难类型
export function savePoorStudentType(query) {
  return request({
    url: '/finances/difficultyTypeController',
    method: 'post',
    data: query
  })
}
// 查询已经设置的困难类型
export function getHasPoorStudentType(query) {
  return request({
    url: '/finances/difficultyTypeController/getDiffTypeYearList',
    method: 'get'
  })
}
// 困难生计划列表
export function poorStudentList(query) {
  return request({
    url: '/finances/difficultyApplyPlanController/list',
    method: 'get',
    params: query
  })
}

// 新增困难生计划列表
export function addPoorStudent(query) {
  return request({
    url: '/finances/difficultyApplyPlanController',
    method: 'post',
    data: query
  })
}

// 修改困难生计划列表
export function editPoorStudent(query) {
  return request({
    url: '/finances/difficultyApplyPlanController',
    method: 'put',
    data: query
  })
}

// 删除困难生计划
export function delPoorStudent(id) {
  return request({
    url: '/finances/difficultyApplyPlanController/'+ id,
    method: 'delete'
  })
}


// schoolScholarship 学校奖学金
// 学校奖学金计划
export function schoolScholarshipList(query) {
  return request({
    url: '/finances/schoolScholarshipTypeController/list',
    method: 'get',
    params: query
  })
}

// 学校奖学金批量添加
export function schoolScholarshipPlAdd(query) {
  return request({
    url: '/finances/schoolScholarshipTypeController',
    method: 'post',
    data: query
  })
}

// 学校奖学金修改
export function schoolScholarshipEdit(query) {
  return request({
    url: '/finances/schoolScholarshipTypeController',
    method: 'put',
    data: query
  })
}

// 学校奖学金申请表上传
export function schoolScholarshipUploadApply(query) {
  return request({
    url: '/finances/schoolScholarshipTypeController/uploadApplyTemplate',
    method: 'post',
    data: query
  })
}

// 学校奖学金删除
export function schoolScholarshipDel(query) {
  return request({
    url: '/finances/schoolScholarshipTypeController/' + query,
    method: 'delete'
  })
}

// 获取已经设置学校奖学金的年份
export function getSchoolScholarshipYear() {
  return request({
    url: '/finances/schoolScholarshipTypeController/getAllYearStrList',
    method: 'post'
  })
}

// 获取当前年份设置的奖学金类型
export function getSchoolScholarshipTypes(query) {
  return request({
    url: '/finances/schoolScholarshipTypeController/getAllTypeNameListByYear',
    method: 'post',
    params: query
  })
}

